package com.hcy.userclient.client;

import com.hcy.rabbitbasicmodel.dto.MyPage;
import com.hcy.rabbitbasicmodel.model.ResponseData;
import com.hcy.rabbitbasicmodel.signl.Add;
import com.hcy.rabbitbasicmodel.signl.Delete;
import com.hcy.rabbitbasicmodel.signl.Update;
import com.hcy.usermodel.dto.request.*;
import com.hcy.usermodel.dto.response.*;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author huchenying
 * Description:
 * @Date 2021/11/20 13:06
 */
@FeignClient(name = "user-service-api")
public interface UserAuthClient {

    @PostMapping("/user/getAuths")
    ResponseData<UserAuthsResponseDTO> getAuthsByName(@RequestBody UserAuthRequestDTO requestDto);
    @PostMapping("/user/getUserPermissionInfo")
    ResponseData<ManagerPermissionResponseDTO> getUserPermissionInfo(@RequestBody UserAuthRequestDTO requestDto);
    @PostMapping("/manager/uploadRoutes")
    ResponseData<Object> uploadRoutes(@RequestBody UploadRoutesRequestDTO requestDTO);
    @PostMapping("/manager/getRoutesList")
    ResponseData<List<RoutesResponseDTO>> getRoutesList();
    @PostMapping("/manager/getUserList")
    ResponseData<MyPage<UserAuthsResponseDTO>> getUserList(@RequestBody UserAuthRequestDTO requestDTO);
    @PostMapping("/manager/insertOrUpdate")
    ResponseData<UserAuthsResponseDTO> insertOrUpdateUser(@RequestBody UserAuthRequestDTO requestDTO);
    @PostMapping("/manager/deleteUser")
    ResponseData<Object> deleteUser(@RequestBody UserAuthRequestDTO requestDTO);
    @PostMapping("/manager/getRoleList")
    ResponseData<List<RoleResponseDTO>> getRoleList(@RequestBody UserAuthRequestDTO requestDTO);
    @PostMapping("/manager/addRole")
    ResponseData<RoleResponseDTO> addRole(@RequestBody RoleResponseDTO requestDTO);
    @PostMapping("/manager/deleteRole")
    ResponseData<Object> deleteRole(@RequestBody RoleResponseDTO requestDTO);
    @PostMapping("/manager/updateUserRole")
    ResponseData<Object> updateUserRole(@RequestBody RoleUpdateRequestDTO requestDTO);
    @PostMapping("/manager/addOptLog")
    ResponseData<Object> addOptLog(@Validated @RequestBody AddLogRequestDTO requestDTO);
    @PostMapping("/manager/getMenuList")
    ResponseData<MenuResponseDTO> getMenuList();
    @PostMapping("/manager/addMenu")
    ResponseData<MenuResponseDTO> addMenu(@Validated(Add.class) @RequestBody MenuRequestDTO requestDTO);
    @PostMapping("/manager/deleteMenu")
    ResponseData<Object> deleteMenu(@Validated(Delete.class) @RequestBody MenuRequestDTO requestDTO);
    @PostMapping("/manager/updateRoleMenu")
    ResponseData<Object> updateRoleMenu(@Validated(Update.class) @RequestBody MenuRequestDTO requestDTO);
    @PostMapping("/manager/getCustomerList")
    ResponseData<MyPage<UserAuthsResponseDTO>> getCustomerList(@RequestBody UserAuthRequestDTO requestDTO);
}
